package com.wxy.dao;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import com.wxy.domain.user;

@Mapper
public interface userMapper {
	@Select("select * from user2 where username=#{username}")
	@Results({
		@Result(column = "username",property = "username"),
		@Result(column = "password",property = "password")
	})
	public user findUserByUsername(String username);
	
	@Insert("insert into user2 values (#{username},#{password},#{role})")
	public int insertUser(user user);
}
